package com.bestv.search.common.dao;

import com.bestv.search.common.model.InfoHeader;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface InfoHeaderDao extends GenericDao<InfoHeader, Long> {

    List<InfoHeader> get(String name, String p_type);

    List<InfoHeader> get(String code, Boolean byCode);

    InfoHeader get(String code);

    int getInfoHeaderCountLikeName(String name, String headerType);

    List<InfoHeader> getInfoHeaderLikeName(String name, String headerType, int start, int limit);

    List<InfoHeader> getAllValidHeader();

    boolean existOnlineInfosForHeaderId(long headerId);

    List<InfoHeader> getHeadersByUpdateTime(Date updateTime);

    String getDefaultCodeByHeaderId(long headerId);

    int getTotalHitCountByHeaderId(long headerId);

    int getItemCountByHeaderId(long headerId);

    List<Map<String, String>> getInfoHeaderItemByHeaderId(long headerId);

}